<?php
/*
 * @Created by: wangchengcheng
 * @Author: wangchengcheng
 * @Date: 2020-01-12 17:36:39
 * @LastEditors  : wangchengcheng
 * @LastEditTime : 2020-01-12 17:39:50
 */

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class RedirectController extends Controller
{
    public function authOauthRedirectToProvider($service)
    {
        return redirect()->route('auth.socialite.redirectToProvider', ['service' => $service])->withInput();
    }

    public function handleProviderCallback(Request $request ,$service)
    {
        $url = route('auth.socialite.handleProviderCallback', ['service' => $service]) . '?' . $request->getQueryString();

        return redirect($url);
    }
}
